package cn.edu.hunau.pm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author hb
 * @date 2024-06-19 10:16:44
 */
@Controller
public class HelloAction {

    // @RequestMapping(path = "/hello",method = RequestMethod.GET)
    @GetMapping("/hello")
    public String helloMethod(){
        System.out.println("Hello SpringBoot");
        return "login";
    }

    @GetMapping("/hi")
    public String hiMethod(){
        System.out.println("Hi SpringBoot");
        return "redirect:login.html";
    }

    @GetMapping("/show")
    public String showMethod(){
        System.out.println("Show SpringBoot");
        return "redirect:/hello";
    }

}
